"""
Currently only contains the bitflags that determine hash values of QuerySets.
"""

def powers_of_two():
    from sys import maxint
    n = 1
    while True:
        yield n
        # Check that we haven't run out of bits
        assert n <= (maxint // 2)
        n *= 2
flags = powers_of_two()

# Simple implementation. Not too sure where we're going from here, so this is
# pretty primitive for the moment.
ORDER_BY = flags.next()
SELECT_RELATED = flags.next()
DISTINCT = flags.next()
OFFSET = flags.next()
LIMIT = flags.next()
SELECT_EXTRA = flags.next()
SELECT_WHERE = flags.next()
VALUES = flags.next()
DATES = flags.next()

# Caching flags
CACHE = flags.next()
CACHE_RELATED = flags.next()
CACHE_SET = flags.next()

